
<style lang="scss" scoped>
@import "../../css/list.scss";
</style>

<template>
    <div class="order_info bgfff">
        <div class="commodity bgfff  padding-15 flex-col">
            <div class="img-bg commodity_img" :style="{backgroundImage:`url(${orderInfo.imgurl})`}"></div>
            <div class="box1 padding-l15 flex-row">
                <div class="box1 flex-col flex-middle">{{orderInfo.commodityName}}</div>
                <div class="flex-col box1 flex-middle">
                    <div class="box1 c82">
                        <span class="cred">{{orderInfo.orderPrice}}</span>积分
                    </div>
                    <span>*{{orderInfo.commodityNumber}}</span>
                </div>
            </div>
        </div>
        <ul class="price padding-lr15 bgfff">
            <li class="flex-col border-t">
                <div class="box1">运费：</div>
                <span class="cred">￥{{orderInfo.orderSendPrice}}</span>
            </li>
            <li class="flex-col border-t">
                <div class="">买家留言：</div>
                <div class="c82 box1">{{orderInfo.buyerMassage | toMsg}}</div>
                <!-- <input type="text" placeholder="选填" class="box1"> -->
            </li>
            <li class="flex-col flex-right border-t">
                共{{orderInfo.commodityNumber}}件商品 &nbsp;&nbsp;合计
                <span class="cred">{{orderInfo.orderPrice*orderInfo.commodityNumber}}</span>积分
            </li>
        </ul>
        <div class="interval"></div>
        <ul class="price padding-lr15 bgfff">
            <li class="flex-col border-b">
                <div class="box1">订单编号</div>
                <span class="c82">{{orderInfo.orderCode}}</span>
            </li>
            <li class="flex-col border-b">
                <div class="box1">兑换时间</div>
                <span class="c82">{{orderInfo.createTime}}</span>
            </li>
            <!-- <li class="flex-col border-b">
                <div class="box1">快递公司</div>
                <span class="c82">圆通快递</span>
            </li>
            <li class="flex-col border-b">
                <div class="box1">快递单号</div>
                <span class="c82">GG15158415</span>
            </li> -->
        </ul>
    </div>
</template>

<script>
export default {
  name: "order_info",
  data() {
    return {
      orderInfo: {}
    };
  },
  mounted() {
    let that = this;
    this.$nextTick(() => {
      that.getOrderInfo(that.$route.query.id);
    });
  },
  filters: {
    toMsg(str) {
      return str ? str : "无";
    }
  },
  methods: {
    getOrderInfo(id) {
      let that = this;
      this.http
        .get("order/info/" + id)
        .then(res => {
          that.orderInfo = res.data;
        })
        .catch(err => {});
    }
  }
};
</script>


